RPM-RS
A pure rust library for parsing and creating RPM files.
Goals
- Easy to use API
- Pure rust to make it easy to use in larger Projects
- Independence of Spec files. Pure programmatic interface for Packaging.
- Compatibility to Centos 7 / Fedora (I may extend test cases for SUSE)
Non Goals
RPM has a lot of cryptic features. I do not want to re-implement all of them. This library focuses on the ones that I assume as useful. This library does not build software like rpmbuild. It is meant for finished artifacts that need to be packaged as RPM.
Status
- RPM Creation
- Basic RPM Reading
- RPM Signing and Signature Verification
- High Level API for RPM Reading
Examples
use rpm;
use ;
let raw_secret_key = read?;
let pkg = new
.compression
.with_file?
// file mode is inherited from source file
.with_file?
.with_file?
.pre_install_script
.add_changelog_entry
.add_changelog_entry
.requires
.build_and_sign
let mut f = create?;
pkg.write?;
// reading
let raw_pub_key = read?;
let rpm_file = open?;
let mut buf_reader = new;
let pkg = parse?;
// verifying
pkg.verify_signature?;